<el-dialog title="登录" :visible.sync="loginDialogVisible" width="30%" center>
    <el-form label-position="right" label-width="auto" :model="loginForm" :rules="loginRules" ref="loginForm">
        <el-form-item label="用户名" prop="user_name">
            <el-input v-model="loginForm.user_name" placeholder="用户名"></el-input>
        </el-form-item>
        <el-form-item label="密码" prop="password">
            <el-input v-model="loginForm.password" placeholder="密码" show-password></el-input>
        </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer" style="text-align: right;">
        <el-button type="primary" @click="login('loginForm')">登录</el-button>
        <el-button @click="toRegister">注册</el-button>
    </div>
</el-dialog>
